home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
015
/
ctrlalt.arc
/
CTRLALT.DOC
< prev
Wrap
Text File
|
1986-04-09
|
101KB
|
2,523 lines
DOCUMENTATION
FOR
CTRLALT
**********************
Version 1.0
**********************
by Barry Simon and Richard Wilson
Documentation for CTRLALT
TABLE OF CONTENTS
Chapter I:INTRODUCTION.................................1
I.1 Features........................................1
I.2 Files in the CTRLALT package and
installing CTRLALT............................2
I.3 Notation........................................3
I.4 Should you read the documentation?..............4
I.5 A Bow and Two Disclaimers.......................4
I.6 Usage Notes.....................................5
I.7 A Warning.......................................5
Chapter II:TWO MONITOR SUPPORT.........................7
II.1 Main Commands..................................7
II.2 Usage Notes....................................7
Chapter III:TABLES.....................................9
III.1 The Character Tables..........................9
III.2 Entering Keystrokes from ASCII Tables.........9
III.3 The aTtribute and aNsi Tables................10
III.4 ASCII codes and Scan codes...................11
III.5 Usage Notes..................................12
Chapter IV:PRINT CONTROL MODE.........................15
IV.1 Line Marking..................................15
IV.2 Printing the Marked Lines.....................15
IV.3 Sending Control Codes to Your Printer.........15
IV.4 Usage Notes...................................16
Chapter V:MARKING MODE................................19
V.1 Marking a Rectangle............................19
V.2 What you can do with the Marked Box............19
V.3 Inserting the Large Buffer.....................20
V.4 Usage Notes....................................22
Chapter VI:BOX DRAWING................................24
VI.1 The Alt Numeric Keypad........................24
VI.2 Box drawing characters........................25
VI.3 Other graphics characters.....................26
VI.4 Cursor motion and <Grey +/->..................26
VI.5 Usage Notes...................................27
Chapter VII:THE EMERGENCY EXIT........................28
VII.1 A Powerful but Dangerous Command.............28
VII.2 Fouled Interrupts............................29
VII.3 RELEASE: A Safety Valve......................31
Table of Contents Page i
Documentation for CTRLALT
VII.4 Usage Notes..................................31
Chapter VIII:COMMAND SUMMARY..........................34
Chapter IX:CUSTOMIZING CTRLALT........................35
IX.1 The Procedure.................................35
IX.2 Fundamental key combination...................35
IX.3 Command keys..................................36
IX.4 Table colors..................................37
IX.5 Table location................................37
IX.6 Copy attributes...............................37
IX.7 XOR attributes................................38
IX.8 Printer escape sequences......................38
IX.9 Using DEBUG...................................38
Table of Contents Page ii
Chapter I: INTRODUCTION
I.1 Features
This documentation for CTRLALT can be printed out on most
printers by typing the command
copy ctrlalt.doc prn
at the DOS command line.
CTRLALT is a collection of resident utilities taking about
7K of RAM. Its features include the following:
-Two monitor support: copy the active monitor to your
inactive monitor on a two monitor system even inside a
running program making your second monitor a useful scratch
pad; other dual monitor support included.
-Popup tables: One screen (indeed partial screen) tables of
ASCII codes, color attributes, ANSI color codes and
keyboard scan codes.
-Entry of non-keyboard characters: a logical and convenient
way of entering the IBM graphics drawing characters. Any
character can be picked off the resident ASCII table.
-Cut and Paste: Resident cut and paste facilities; with one
keystroke, you can enter a mode which allows you to mark
a box (on either screen, if you have two) which you can
save in a buffer and later insert in any program. You can
print part or all of your screen (or screens on a dual
monitor system).
-Resident printer codes: If you have an IBM graphics
compatible printer, you can send a variety of control codes
to it at any time.
-Emergency exit: a way of recovering from situations where
your system crashes due to some program getting into a loop
or dead end.
In order to keep the memory used to a minimum, no on screen
help is provided. You will need to refer to this documentation
when you need further information. The basic commands follow a
mnemonic system and a command summary can be found in Chapter VIII
and in the file CACMDSUM.DOC which you can print out separately.
This documentation is for version 1.0 of CTRLALT. You can find out
which version of CTRLALT you have by entering the command
type ctrlalt.com
at the DOS prompt. Normally typing a com file will produce junk on
the screen but we have arranged that only brief useful information
will appear when you issue this command. And you needn't worry
that we are filling your memory with unneeded information when the
program loads; the part of the com file that gets typed is used for
the "small buffer" discussed in Chapter III.
Chapter I:INTRODUCTION Page 1
Documentation for CTRLALT
I.2 Files in the CTRLALT package and installing CTRLALT
CTRLALT consists of the following files:
-CTRLALT.COM executable program file
-CTRLALT.ASM source code
-CTRLALT.DOC this file
-CACMDSUM.DOC a short summary to print out and have handy
-RELEASE.COM a program by R. M. Wilson discussed in Chap VII
-RELEASE.ASM source code
-RELEASE.DOC documentation for RELEASE
The source code for CTRLALT is provided in part to allow you
to customize the program if you have access to the MICROSOFT or IBM
Macro Assembler. Directions for customizing CTRLALT are provided
in Chapter IX. For a small number of commands Chapter IX also
provides directions on using DEBUG to make the modifications. We
hope to include an installation program in a future release of
CTRLALT.
CTRLALT is a resident program which, once installed, will
remain in your computer's memory until you reboot (unless you use
RELEASE as described in its documentation). You install it by
typing
ctrlalt
at the DOS prompt or placing that line in your AUTOEXEC.BAT file.
Once you have the program installed, try depressing the CTRL and
ALT keys and then one of the letters A, H or T while you are
holding down CTRL and ALT. Hitting <Esc> will make the resulting
table disappear. While examining the table that appears in
response to <Ctrl-Alt-T>, try hitting a letter key and then a
function key. This will show you some of the features of CTRLALT.
If you happen to load CTRLALT a second time, it will load and
you will lose the memory it takes so it is probably best to load it
in your AUTOEXEC.BAT file. CTRLALT uses only two interrupts (one
of the keyboard interrupts and the clock interrupt) and it
is careful to pass any keystrokes not intended for it to any
programs loaded before it. It cooperates with other resident
programs but certain other resident programs may not cooperate with
it. For this reason, it is best to load it after any keyboard
macro program such as SUPERKEY or PROKEY. When NEWKEY is
installed, occasionally the first keystroke issued after exiting a
CTRLALT module will not get passed to your program. Since SMARTKEY
has trouble passing keystrokes to resident programs, CTRLALT does
not work well with SMARTKEY. If you have loaded KEYWORKS, you
cannot safely invoke CTRLALT when a KEYWORKS menu is displayed but
otherwise the two programs seems to work together. We know of no
other incompatibilities.
Chapter I:INTRODUCTION Page 2
Documentation for CTRLALT
I.3 Notation
Commands are passed to CTRLALT by depressing the Control and
Alternate keys at the same time as a third key. (By customizing,
you can replace this with any other pair of shifts.) You must
first depress the shift keys and then, keeping the shift keys
depressed, press the third key. We will indicate such a
combination as ^@<key> so that for example ^@C means to hold down
Control, Alt and then depress the <C> key. Various key names will
appear in brackets such as:
<Esc> the Escape key marked "Esc". This is the key to exit
most modules of CTRLALT.
<Enter> the "Enter" or "Return" key
<n0>,...,<n9> the number keys on the numeric keypad
0,1,2,3... refer to the number keys on the top row
(sometimes, we will refer to 0(zero) to distinguish it
from "oh"; while the distinction is clear on your
screen, it is not always clear on your printer)
<Grey +>, <Grey -> the plus and minus at the extreme right of
the keyboard
+,- refer to the +/= and _/- keys on the top row
<Arrows> the generic name for the the four arrow keys
<PrtSc>, <Ins>, <Del>, <Home>, <End>, <PgUp>, <PgDn> the keys
with these words marked on them
<F1>, etc., the function keys
Occasionally for emphasis, we will denote the key with !/1 on it by
<1>, the key with Q as <Q>, etc.
To help remember the large number of commands which CTRLALT
will take, the keys chosen have mnemonics associated with them and
we will often write out the mnemonic with the special key
capitalized. Thus ^@aNsi is a mnemonic for the command ^@N. In
particular, ^@Enter (the mnemonic for ^@E) should not be confused
with ^@<Enter>, the command issued by depressing Ctrl, Alt and
<Enter> at the same time.
Once a module of CTRLALT has been invoked with ^@<key>, there
may be single letter "subcommands" which we have tried to make
consistent across modules. In particular:
E Enters something into a buffer or your program
P sends something to your Printer
S Switches a marking cursor from one monitor to the other
<Esc> exits the module
As for ^@ commands, we use mnemonics for subcommands so that, for
example, cUt is a mnemonic for the subcommands issued by <U>.
CTRLALT sets aside two places to store keystrokes which you
can later enter. One accessible from "Marking Mode" (Chap V) will
store up to a full screen of data and is called "the large buffer"
and one accessible when the ASCII or Hex tables are displayed will
Chapter I:INTRODUCTION Page 3
Documentation for CTRLALT
take up to 64 strokes and is called "the small buffer". As
currently implemented these buffers can only contain ASCII codes
and not the extended ASCII codes associated with function or alt
keys.
I.4 Should you read the documentation?
Yes!
However, we are aware that the full documentation is long.
This is because of the many services that CTRLALT offers. We
suggest that you learn about one or two modules at a time and have
tried to write the documentation in a way that you can read
individual chapters. For many of the modules, it will be more
convenient to experiment in your word processor than in DOS. And
we apologize for warning you about the difference between ^@Enter
and ^@<Enter> more times than you will need, but we want to be sure
that you see it even if you skim the documentation.
I.5 A Bow and Two Disclaimers
This program was developed by Barry Simon and Richard Wilson.
It is POSTWARE: if you like it, send us a postcard addressed to us
at
253-37 Caltech
Pasadena, CA 91125
Of course, we're glad to hear comments, suggestions about
enhancements, and even about complaints, incompatibilities and bugs.
Simon has a Compuserve number [76505,2315] but he doesn't promise
to check his Compuserve mailbox very often! And if you like the
program please give it to your friends, place it on bulletin boards
and otherwise spread it around. While it is copyright by the two
of us, we explicitly allow any use of it but request that at a
minimum, the CTRLALT.COM and CTRLALT.DOC files be distributed
together.
While we have a connection with Caltech, we emphasize that
this program has no such connection.
And we make the usual disclaimer: this software is
distributed "as is" and is warranted for no purpose. Any risk
associated with its use including, but not limited to, loss of data
is borne by the user.
The following are trademarks or copyrighted names of the
companies indicated in parentheses: FANSI-CONSOLE (Hersey
Microcomputing), Proprinter & IBM (International Business
Machines), KEYWORKS (Alpha Software), MONOGRAFXS (Analytics
Chapter I:INTRODUCTION Page 4
Documentation for CTRLALT
international), NEWKEY (FAB software), PCED (Cove software),
PCWRITE (Quicksoft), PROKEY (Rosesoft), SIDEKICK, SUPERKEY & TURBO
PASCAL (Borland International), SMARTKEY (Software Research
Technologies), WORDSTAR (Micropro).
The original version was finalized during April, 1986.
I.6 Usage Notes
Many chapters will end with some "Usage Notes" which we hope
will help you use CTRLALT and will deal with some special
situations. We are painfully aware of the fact that there are only
six combinations of pairs of the four shift keys and that software
developers are fond of using them as "hotkeys" for resident
programs. Because CTRLALT has so many hotkeys, we felt that we had
to use three key combinations and it was natural to use two shifts
as the common callup. Besides, once we named the program
CTRLALT, we had no choice!
The customization procedure described in Section X.2,
explains how to change which pair of shifts combine with letter
keys to call up CTRLALT. Because a third key is involved you will
probably want the two shifts to be on the left side and the second
choice is clearly <Ctrl-LftShft>. It is even possible to replace
the <Ctrl-Alt> combinations by just <Alt> or just <Ctrl> although
this will likely cause problems with some of your application
programs that use Alt or Ctrl keys.
If you are a SIDEKICK user, you probably use ^@ to invoke
SIDEKICK. More recent versions of SIDEKICK allow you to change
this choice and we believe that is better than changing CTRLALT
but clearly you should follow your preference. We note that while
SIDEKICK allows you to choose two different combinations to invoke
it, you can choose to have only one: while running SKINST you need
only hit the same shift twice when asked for "Secondary command"
after making the "Activate commands" choice from the SKINST main
menu.
One final warning about the choice of ^@. We are careful not
to use ^@ with any of the numeric keypad or with <Grey +>/<Grey ->
to avoid any chance of accidentally pressing ^@<Del>. If you
customize, we suggest that you keep this convention although using
^@ with <n7>, <n8> or <n9> (or <PrtSc> on an AT style keyboard)
should be safe.
I.7 A Warning
Many of the modules in CTRLALT are quite powerful and should
Chapter I:INTRODUCTION Page 5
Documentation for CTRLALT
be used with care. We have in mind especially the emergency exit
feature invoked by ^@<F9>. PLEASE READ CHAPTER VII BEFORE
EXPERIMENTING WITH IT. We urge you to try it initially in a
situation where you would lose nothing but a little time if your
system underwent a hard crash (i.e. required you to turn the power
switch off and on). We don't wish to frighten you from using this
module since it can be useful but we urge some care.
You may need to experiment with the different modes of entry
of material previously cut in the marking module discussed in
chapter V. Some programs don't accept keystrokes in quite the way
that you might expect. The same caution applies to the entry of
graphics characters as described in Chapter VI. Not all programs
will accept ASCII characters with codes between 129 and 256 or will
act in the way you would like. Problems associated with these
issues are not likely to cause any serious foulups and can usually
by corrected by a little deletion and retyping.
Chapter I:INTRODUCTION Page 6
Chapter II: TWO MONITOR SUPPORT
COMMANDS: ^@Copy, ^@Kill, ^@Switch, ^@Other
II.1 Main Commands
^@C for Copy will copy the current monitor to your second monitor
if you have a two monitor system. ^@K for Kill will blank your
inactive monitor. It is NOT necessary to blank your inactive
monitor before copying to it a second time; ^@K is provided so you
needn't look at the material on your second monitor when you no
longer need it. ^@S for Switch will copy the present screen to the
inactive screen and transfer control to the inactive screen. ^@O
for Other will place ASCII tables in Hex and decimal on your
inactive monitor; they will not erase the whole inactive monitor
but will cover up a large portion of it. ^@K will erase them and
the rest of the inactive screen.
II.2 Usage Notes
You will use ^@C the most. You will discover that your
inactive monitor makes a great scratch pad and that you no longer
need to make little notes which get lost on your desk. Indeed, we
believe that if you use your computer a lot and have a single
monitor system, it may be worth investing in a second one (a
monochrome card and monitor can be purchased for as little as $250)
just to use ^@C!
Unfortunately, ^@K does not kill the cursor on the inactive
monitor. However, it will not produce a cursor if none is there
and ^@S takes the cursor with it. Thus, the sequence of commands
^@S,^@S,^@K
will erase the inactive screen and remove the cursor on it. It
will not change any colors on the original monitor.
For the technically minded, we note that a screen ^@Copied to
a monochrome monitor has all attributes set to 07 (white, green or
amber on black) and a screen ^@Copied to the color monitor has
attributes set to 1EH (yellow on blue). ^@S copies the exact
attributes so that a double ^@S to remove your cursor doesn't lose
any attributes.
^@S will not be used very often. If used in a running
program, the results may be unpredictable if the program writes
directly to the screen; for example loading PCWRITE on a color
screen and using ^@S will thoroughly confuse PCWRITE. At the DOS
command line, it is preferable to use a command like "Mode mono" to
switch screens since that will reinitialize the cursor. There is a
strange interaction involving the cursor between CTRLALT and the
Chapter II:TWO MONITOR SUPPORT Page 7
Documentation for CTRLALT
DOS command editor PCED (and its public domain precursor CED) which
can cause ^@S to give you a cursor in a funny place; you can even
lose your cursor completely. However, this interaction does not
take place if you are only using ^@S twice to remove a cursor on
the inactive screen and you do not issue any commands between the
two ^@S commands.
If you have a dual monitor system, ^@C will not work before
both monitors are initialized. That is, if your boot up procedure
only uses one monitor, say the color monitor, ^@C will not work
until you have made the system recognize the other monitor by
issuing a "mode mono" command (followed by mode co80) or otherwise
"used" your second monitor. However, ^@S will work and a pair of
^@S's can be used to initialize the inactive monitor.
CTRLALT works in 80 column text mode. Thus, if you try to
copy a monochrome screen to a color screen which was initialized in
a 40 column text mode or last in graphics mode, the copy will not
be successful. However, ^@S, ^@S, ^@C from the monochrome screen
will place the color screen in the proper mode and copy the
monochrome screen to it.
The dual monitor commands if issued by accident on a single
monitor system will certainly not cause catastrophe. ^@C, ^@K and
^@O have absolutely no effect. ^@S will cause a problem but a
second ^@S followed by a "clear screen" should recover. But, if
you have a single monitor system and the Macro Assembler, you
should follow the directions in Section IX.3 for disabling the dual
monitor services or you can follow the directions in Section IX.9
for using DEBUG.
If your graphics monitor is in a graphics mode, issuing a
^@Copy will not have any adverse effect but it will produce junk on
your inactive screen. A ^@Switch will be more dramatic but issuing
an immediate "clear screen" will often allow you to recover.
Graphics monitors can use their extra memory in text mode to
show more than one page (4 pages on the CGA and up to 8 pages on
the EGA) and there is software (e.g. FANSI CONSOLE) that allows you
to shift pages. CTRLALT assumes that "page 1" is the page being
displayed on your color monitor and, for example, ^@C will copy that
page to the monochrome screen even if another page is currently
displayed. Similarly, the highlighting in print control and
marking modes (see Chapters IV and V) will not show on the color
screen if any page other than page one is displayed. The issues
discussed in this paragraph will be irrelevant to most users who
will not be on any page other than page 1. If you do wind up on
another page in memory a command that reinitializes the screen such
as "mode co80" will make page 1 the page displayed on the color
monitor.
Chapter II:TWO MONITOR SUPPORT Page 8
Chapter III: TABLES
COMMANDS: ^@Ascii, ^@Hex, ^@Other, ^@aTtributes, ^@aNsi,
^@Enter,^@Quit
^@A,^@H SUBCOMMANDS: <Arrows>, <Home>, <End>, <Esc>, Enter,
Print, Buffer
^@T SUBCOMMANDS: <anykey>, <Esc>
WARNING: Do not confuse ^@Enter (that is ^@E) with ^@<Enter> or the
subcommand Enter (the is E) with <Enter>
III.1 The Character Tables
CTRLALT allows you to pop up two different tables of ASCII
characters at any time. They are more compact and therefore
perhaps more useful than the ASCII tables provided by programs like
SIDEKICK. ^@A popsup a table which is 34 characters across and 14
down showing a decimal ASCII table. The characters are shown in
groups of ten with the groups labelled 000, 010, ... ,250. The
characters appearing as 256-259 are really repeats of 0-3. Please
remember that the groups start with xx0, that is, for example, the
third character in group 080 (the letter R) has ASCII code 082 not
083.
^@H shows a similar table 18 long by 22 wide with Hex ASCII
values. The rows are labelled with a hex digit followed by 0 and
the columns with the second hex digit. ^@O shows both tables at
once on your inactive monitor.
Pressing <Esc> when the tables produced by ^@Ascii or ^@Hex
are active clears the tables and restores the screen. You cannot
restore the inactive screen following ^@Other although you can clear it
with ^@Kill. You cannot show both tables on your active screen;
that is, ^@A has no effect after a ^@H and vice versa.
III.2 Entering Keystrokes from ASCII Tables
The tables produced by ^@A or ^@H have a highlighted cursor,
the first time at character 00 but at later times wherever you left
the cursor the last time that table was used. The four arrow keys
move the cursor in the obvious ways and <Home>/<End> moves the
cursor to positions 000 and 259 (00 and FF on the Hex table).
Once you have moved the cursor to the desired character, you
have a number of options:
E will Enter the highlighted character at the position your
cursor was when CTRLALT was invoked and the table will
disappear
P will send the character to your Printer. The table
remains on the screen so you can send several
Chapter III:TABLES Page 9
Documentation for CTRLALT
characters to your printer. The small buffer is not
affected.
B will send the character to the small Buffer. The table
remains on the screen so that several characters can be
sent to the buffer.
<Esc> will make the table disappear but the small buffer is
not cleared.
CTRLALT keeps a small buffer of up to 64 characters. When
the choice E is made, the highlighted character is added to the end
of the buffer and the entire buffer is inserted at the original
cursor position. Thus, if several B subcommands have been issued
followed by an E several characters will be entered. And if only a
single E with no B subcommands has been entered, then the buffer
will have one character in it. If you wish to put several
characters in the small buffer without entering any of them yet,
then use several B subcommands followed by an <Esc>. If no E or B
subcommands have been invoked, the small buffer will not be changed
and will remain what it was when you invoked the table. An E or B
command will clear the buffer of what it had in it before ^@A or
^@H was invoked but does not affect any additions to the buffer
made during the current invocation.
At any time you can strike ^@E to Enter the contents of the
small buffer at the current cursor position. ^@Entering does not
empty the buffer so that you can repeatedly reissue the buffer.
For example if you need to enter a string of ^I's to your program,
you need only call up ^@Ascii highlight position 009, press E (or B
and <Esc>) and then ^@Enter as often as necessary. If you strike
^@E a second time while CTRLALT is still sending characters from
the buffer due to a first ^@E, the first insertion is aborted and a
second insertion begins at the head of the buffer, probably not
what you want. You can halt the playback of the contents of the
small buffer with ^@Q. After using ^@Q to Quit, you are back in
your application program. A ^@E will reinsert the small buffer
from its beginning while another ^@Q will continue the playback of
the buffer at the point you quit with the first ^@Q.
PLEASE DON'T CONFUSE ^@Enter AND ^@<Enter>!!!
See the Usage Notes to this chapter for a discussion of
exactly how characters are sent to your program, for a warning
about sending characters to your printer and for a discussion of
alternates to using the small buffer.
III.3 The aTtribute and aNsi Tables
^@T will pop up a table of colors which is 22 wide by 11
down. This table has rows labelled with a hex digit and 0 and
Chapter III:TABLES Page 10
Documentation for CTRLALT
columns labelled with a single digit. The color combination in row
60 and column F has what is called color attribute (hence T for
aTtributes) 6FH (The H stands for Hex; in this case 6F is white on
brown). Some programs require you to pick colors by giving these
attributes which is why this table can be useful. For example, you
can change the colors that CTRLALT uses for its tables by modifying
the source code; you will need to insert attributes in appropriate
places as will be described in Section IX.4. The table only shows
attributes 00H through 7FH but attributes run up to FFH. Row 8x is
the same as row 0x, row 9x is the same as row 1x,... row Fx is the
same as row 7x except that the character is blinking. We decided
to spare you the blinking! If you have a monitor which is two
color ("monochrome") but with many shades such as the COMPAQ
monitor, the attribute table can be very useful in showing you what
attribute choices correspond to what shadings.
Unfortunately, the color codes used by the ANSI.SYS device
driver are different from the color attributes. ^@N for aNsi will
pop up a table showing the ANSI conventions. The rows are marked
4x because ANSI uses that for background colors. The columns are
marked 0;3x or 1;3x because that is the ANSI convention for
foreground colors. In the Usage Notes to this chapter, we explain
how to use the table to set colors in DOS via the PROMPT command.
The colors in the ANSI table are not set using the ANSI.SYS
device driver but by writing the color combinations directly into
memory. Thus colors will show even if you do not not have an ANSI
device driver loaded. A non-standard replacement for ANSI.SYS
which attempts to correct the ANSI codes on a monochrome screen
(for example, FANSI-CONSOLE) may show attributes set by ANSI
commands differently from indicated in the aNsi table. However, on
a color monitor, the attributes shown by the aNsi table should
correctly correspond to those set by any ANSI.SYS compatible device
driver.
III.4 ASCII codes and Scan codes
Each letter has an ASCII code and each key of the keyboard
has a so-called scan code. Certain programs require you to give
scan codes, some in decimal form and some in hexadecimal form.
When the aTtribute table is active, pushing any key or simple key
combination will cause the scan codes of the key in hex and decimal
to be displayed at the top of the table and the ASCII code in hex
and decimal to be displayed at the bottom of the table. By
convention, a key and its shifted version have the same scan codes
but some of the alt and ctrl shifted keys have special "scan codes"
different from the ordinary keys. For such keys, the ASCII code
will be listed as 00 and the "scan code" as the appropriate code.
The scan code in this case is often called "extended ASCII code" or
Chapter III:TABLES Page 11
Documentation for CTRLALT
"second ASCII code". In the Usage Notes, we will explain how these
codes are used in ANSI keyboard redefinition. For example, in
decimal form <F1> has second ASCII codes 59, 84, 94 and 104 in its
unshifted, shifted, ctrl-shifted and alt-shifted states. Try
hitting ^@T followed by <F1>, <Shft F1>, <Ctrl F1>, <Alt F1> to see
this in action. You won't need to reach for your BASIC manual any
more to look up these numbers with CTRLALT there to help you!
Since <Esc> exits from the aTtribute table, you can't use
CTRLALT to get the codes for <Esc>. You'll just have to remember
them. The scan code is real hard: it's 01 decimal and 01H. The
ASCII codes are 27 decimal and 1B in Hex.
Two warnings about using CTRLALT to generate scan codes which
we'll expand upon in the Usage Notes: if you have a keyboard macro
program installed and you redefined <Alt 1> to mean "hello",
pressing <Alt 1> will not display the codes (78H scan and 00 ASCII)
for alt-1 but will display the codes (18H scan and 6FH ASCII) for
"o", the last letter in hello. That is, your keyboard macro
program will get to translate the keystrokes before passing them to
CTRLALT. Similarly, if you want the scan code for <Alt-End> (94H),
you must be sure you are in the ^@0(zero) mode discussed in Chap
VI. By default, CTRLALT translates <Alt n1> to the box line
character, └, ASCII code C0H and that is what will appear in
aTtribute mode if you strike <Alt End> (which is the same as <Alt
n1>) without shifting to ^@0 mode. Thus the box drawing module of
CTRLALT translates the keystrokes before passing them to the
aTtribute module.
III.5 Usage Notes
When the Ascii or Hex tables are displayed, the cursor can be
moved off the tables and the characters on the screen Entered,
Printed or put in the Buffer. However, if you wish to get
characters off the screen, it is probably preferable to use marking
mode described in Chapter V. When in these tables, hitting any key
but the arrow keys, <Home>, <End>, <Esc>, <E>, <P> or <B> has no
effect.
If the small buffer fills and you press <B>, the table will
disappear and you will be placed back at the cursor position. If
you don't get your finger off the key soon enough, some extra <B>'s
may be issued to your program. The buffer can be entered with ^@E.
Characters sent to many printers are often not printed until
line feed (ASCII code 0AH) is sent. Thus, your use of the Printer
option when the tables are active may seem to have no effect; if
you want to see the effect, you can send the necessary 0AH or 10
decimal ASCII code. You can send control codes to the printer from
the ASCII table but it is easier to use the printer control mode
Chapter III:TABLES Page 12
Documentation for CTRLALT
described in the next chapter.
When you strike a key like <a> on your keyboard, the ASCII
code (61H in this case) and scan code (1EH in this case) are stored
in DOS's keyboard buffer until input is requested by a calling
program. You can also enter an "a" using the numeric keypad and
the decimal ASCII code (97 in this case): just hold down the <Alt>
key, press <n9>, then <n7> and then let go of the <Alt> key. The
ASCII code is still entered in the buffer as 61H but the scan code
is 00. To see this, call up ^@T, and depress <n9>, <n7> while
holding down both the <Alt> and <LftShft> keys. The point of this
is that CTRLALT enters characters from the small buffer and tables
(or from the large buffer for that matter) as if they were being
entered from the numeric keypad, that is with a scan code of 00.
This may affect how your keyboard macro program processes something
like a "+" if you have defined a macro for <+> but not for <Grey
+>; generally, it will act like the more usual key but that depends
on the keyboard macro program. This issue, especially as regards
KEYWORKS, is discussed further in Section V.4.
It is also important to realize that the keystrokes entered
by CTRLALT from the tables or buffers will be processed by your
application programs or keyboard macro/application program
combination. Thus placing the cursor on 18H in the Hex table (Ctrl
X) and pressing E will move the cursor down in WORDSTAR just as
hitting <Ctrl-X> would do and it will not enter a Ctrl-X in your
file.
If you want to enter a long string of graphics characters
such as ════════════, you could place the corresponding ASCII
character in the small buffer (C4H in this case) and use ^@E many
times but you should be aware that CTRLALT's box drawing mode
described in Chapter VI is probably easier to use.
ANSI color codes are useful for setting screen colors in DOS.
The syntax is <esc>[3x;4y(;1)m where x and y can be read off the
^@N table and the ;1 is optional. Thus the command
prompt $e[33;44;1m$p$g
at the DOS command line would set colors to yellow on blue and
display your current drive and directory ($p for path) and a ">"
($g) as your visible prompt assuming you had included a line
device=ansi.sys
in your CONFIG.SYS file. Or the command
prompt $e[33;44;0m$p$g$e[32;44;1m
will display the path and ">" in brown on blue and what you type in
green on blue. The "1" and "0" codes are toggles so that if both
colors were intense, it would not be necessary to place the "1" in
each escape sequence.
The reason that ANSI codes and color attributes are not the
Chapter III:TABLES Page 13
Documentation for CTRLALT
same is that if the hex digit is written in binary as 0xyz, then x
is Red, y is Green and z is Blue in color attributes and in ANSI
the roles are in the reverse order. Thus cyan, which corresponds to
green and blue on, is 011 (=3H) in attributes and 110 (=6H) in ANSI.
For the technical among you, CTRLALT intercepts interrupt 09H
when looking for its commands but waits for interrupt 16H to act
before reading its subcommands and/or scan codes. This is why
keyboard macro programs will process input before CTRLALT reads the
scan codes. CTRLALT does see the original keystroke through int 09
but passes it up the chain where the macro program processes it
before the ^@T module reads the scan codes via int 16.
Extended scan codes are useful for ANSI keyboard
redefinition. For example, to redefine <F1> to be "dir" followed
by <Enter> you need to send
<esc>[0;59;"dir";13p
to the screen. The <esc>[ and "p" are the ANSI codes indicating
key redefinition while 13 is the decimal ASCII code for <Enter> and
59 the extended ASCII code for <F1>. That is, if you call up ^@T,
and press <Enter>, you'll see a decimal ASCII code of 013 while
pressing <F1> will return an ASCII code of 00 and a decimal "scan"
code of 59.
Chapter III:TABLES Page 14
Chapter IV: PRINT CONTROL MODE
COMMANDS: ^@P
SUBCOMMANDS: <Up Arrow>, <Down Arrow>, <PgUp>, <PgDn>, <Home>, <End>
Switch, Print=<Enter>, All, <Esc>
Bold, Emphasized, Doublestrike, Compressed, double Wide
Tiny, near letter Quality, pIca, 8 lines/in, Underline
Form feed, New page top
character set 2, 1 direction, sKip perforations,
Reset, Off
IV.1 Line Marking
^@P calls up a line marking mode which can be used to send
lines to the Printer and where it is possible to send control codes
to an IBM Graphics compatible printer. A whole line mark appears
at the position of your current cursor. This line can be expanded
to a multi-line band. <PgUp> and <PgDn> move the band up and down
without changing its width. The <Down Arrow> key makes the band
wider by moving the bottom edge down one line without moving the
top edge. This key has no effect if the bottom edge is on the
bottom of the screen. The <Up Arrow>key makes the band narrower
by moving the bottom edge up by one line without changing the top
edge. If the band is one line wide, <Up Arrow> has no effect.
<Home> moves the band to the top of the screen and <End> to the
bottom without changing the width. If you have a dual monitor
system, S for Switch will switch the band to your inactive monitor
and a second S will switch it back. The band can be adjusted while
it is on either monitor. At any time <Esc> exits this mode with no
further action.
IV.2 Printing the Marked Lines
After you have marked some lines, you have two options for
printing on the system printer LPT1:
P Prints the marked lines on the printer
A Prints all lines on the screen with the marking
Thus, A acts like <Shft PrtSc> if you haven't Switched the marking
to the other screen while ^@P,S,A will print what's on your
inactive screen. At any time <Esc> exits this mode with no
further action. <Enter> means the same thing as P, i.e. it prints
the marked lines on your printer.
IV.3 Sending Control Codes to Your Printer
Did you ever wish that you could send commands to your
printer while inside a running program? CTRLALT lets you do that
while in its ^@P mode. Hitting the letters or numbers in the first
column sends the commands indicated; for the technically inclined
Chapter IV:PRINT CONTROL MODE Page 15
Documentation for CTRLALT
the last column gives the actually decimal ASCII codes sent to the
printer. THESE CODES ONLY DO THE OPERATIONS LISTED FOR PRINTERS
COMPATIBLE WITH THE IBM GRAPHICS/EPSON MX 80 including the IBM
Proprinter and Epson FX 80. Three are special to the PROPRINTER.
┌────┬───────────────────────────────────┬───────────────┐
│ │ PRINTER FUNCTION │ ASCII CODES │
╞════╪═══════════════════════════════════╪═══════════════╡
│ B │ Bold=Emphasized+Doublestrike │ 27,69,27,71 │
│ E │ Emphasized print │ 27,69 │
│ D │ Doublestrike │ 27,71 │
│ C │ Compressed print │ 15 │
│ W │ double Wide │ 27,87,1 │
│ T │ Tiny = Superscript, 1.5 mm │ 27,83,1,27,65,│
│ │ line spacing, compressed │ 5,27,50,15 │
│ Q │ near letter Quality (PROPRINTER) │ 27,73,2 │
│ I │ pIca=12 cpi (PROPRINTER ONLY) │ 27,58 │
│ 8 │ 8 lines per inch spacing │ 27,48 │
│ U │ Underline on │ 27,45,1 │
│ F │ Form feed │ 12 │
│ N │ New page top(PROPRINTER ONLY) │ 27,52 │
│ 2 │ character set 2 │ 27,54 │
│ 1 │ 1 directional printing │ 27,85,1 │
│ K │ sKip perforations │ 27,78,8 │
│ R │ Reset │ INT 17H │
│ O │ Off │ 27,70,27,72,18│
│ │ │ 27,87,0,27,84│
│ │ │ 27,79,27,55, │
│ │ │ 27,45,0,27,65│
│ │ │ 12,27,50,27, │
│ │ │ 73,0,13 │
└────┴───────────────────────────────────┴───────────────┘
The box characters in the above table were entered with the CTRLALT
box drawing mode (Chapter VI).
Rather than have separate commands to turn printer features
on and off, you can only turn them on with single commands. The
Off command turns off all special printing features; it should have
the same effect as turning your printer off and on except that it
will not reset the meaning of top of page. The RESET command,
which should work with any printer uses a BIOS routine and, when it
works, has the same effect as turning the printer off and on
including resetting the top of page. It appears not to work when
one of several different print spooling programs is installed.
IV.4 Usage Notes
Until you get used to print control mode, you will probably
call up ^@P and then hit the <Up Arrow> and be surprised that
nothing happens. Note that the <Up Arrow> moves up only the bottom
Chapter IV:PRINT CONTROL MODE Page 16
Documentation for CTRLALT
edge of the marked region and has no effect when the region is one
line wide. Use <PgUp> to move the marked region up.
In print control mode, all letter subcommands except P, A, S
send codes to the printer.
Characters sent to the printer using this module are
filtered to avoid control characters being sent inadvertently.
That is characters 00H through 1FH and 80H through 9FH (0-31 and
128-159 decimal) are replaced with spaces before the characters are
sent to the printer. Such filtering is not done in printing from
the ASCII and hex tables nor in marking mode (discussed in the next
chapter). To see the difference, call up the ASCII table with ^@A,
then call up ^@P and highlight the first row followed with <P>.
Only spaces will be printed. Now call up ^@<Enter>, move the
cursor to ASCII code 007 (Ctrl G) and hit P. This single character
will be sent unfiltered to your printer and you will hear a beep.
Except for the issue of filtering, you may find it more
convenient to use marking mode to send characters to the printer.
In the default "character set 1", the printer interprets codes
in the 80H through 9FH range as the corresponding code 80H smaller
so that, for example, 9B is the same as 1B (<Esc>). Character set
2 which can be turned on with the <2> subcommand prints out various
foreign alphabet characters for these codes corresponding to what
you will see on your screen if you popup an ASCII table. Since
CTRLALT cannot know which character set your printer is using,
filtering in printer control mode is always on. Thus the <2>
command is only useful for printing out files with DOS's copy
command, in some application programs, or printing from a CTRLALT
table.
Turning on Emphasized or Doublestrike print slows down your
printer by a factor of about 2 and turning on both by a factor of
4. Nevertheless, output in this "Bold" mode looks so good that we
have included a separate command (B) to turn it on. Thus B is
equivalent to striking <D> and <E>. If you have a Proprinter you
might look at the NLQ (invoked with Q) or <Q> and <D> together.
Tiny print is a combination of superscript mode, compressed
print and a reduced number of lines per inch; it has an interesting
affect somewhat akin to the EGA's 43 line screen mode. The eight
lines per inch mode invoked with <8> does not change the size of
characters but removes white space between lines. It is useful for
saving paper in printing out things like program listings with the
"copy ... prn" command. Unidirectional printing, invoked with <1>,
slows the printer down but is useful if you want columns to come
out especially straight. You may want to use it when printing out
the graph drawing characters.
Chapter IV:PRINT CONTROL MODE Page 17
Documentation for CTRLALT
The underlining turned on by <U> is continuous; even blank
lines are underlined.
The sKip perforation command sets the printer to print out 58
lines and then skip 8. If you want to use it, you should set the
top of page to about four lines below the perforation and then use
the <R> or <N>(on a Proprinter) command or turn your printer off
and on.
The IBM Graphics printer does not allow you to turn on all
possible combinations of special print features. Only one of
Compressed and Emphasized can be turned on and only one of the
following three: Double strike, subscript and superscript. The
rules for the IBM Proprinter are somewhat different, see page 4-35
of the Proprinter Guide to Operations.
There is no problem invoking ^@P while your screen is in a
graphics mode. You cannot use the mode to print part of the screen
in a useful way (although you could Switch to your monochrome
monitor and Print part of it), but you can successfully send
control codes to your printer. When ^@P is invoked from a graphics
screen, a certain amount of garbage will appear on the screen but
that will disappear and your screen will be successfully restored
when you <Esc> from the print control mode.
Currently, the printer marking works perfectly on lines 1-25
even when the EGA is in its 43 line mode. However, you cannot mark
more than one line below line 25 and you can only mark a line above
the one you start on. Moreover, the <A> command will only print
the first 25 lines of the screen even if you have a line after the
25th marked, but then again, Shift PrtSc also only prints the first
25 lines displayed. We hope to remove these limitations in a future
version of CTRLALT.
If you don't have your printer turned on and you invoke ^@P,
if no printer is attached to your system or if you have a
printer turned on but you have switched it off line by pushing an
"Online" button and you invoke ^@P, CTRLALT will beep at you and
refuse to come up. If you have a print spooler resident, CTRLALT
thinks that you have a printer attached and it will act normally
passing characters to the spooler.
If you have a two monitor system and set colors via ANSI.SYS
in your prompt, the band in print control mode may appear invisible
on your monochrome monitor. The ^@Vanilla command should resolve
this problem. It is discussed in Section V.4.
Chapter IV:PRINT CONTROL MODE Page 18
Chapter V: MARKING MODE
Commands:^@<Enter>, ^@Vanilla, ^@Insert, ^@Quit
Insertion Control Options: ^@Backspace,^@carriage Return, ^@Zilch
Insertion Speed Controls: ^@+, ^@-
^@<Enter> Subcommands: <Enter>, <Ins>, Switch, <Esc>, <Arrows>,
<PgUp>, <PgDn>, <Grey +>, <Grey ->,
cUt, Copy, Print, Enter
V.1 Marking a Rectangle
^@<Enter> brings up a solid block cursor at your present
cursor position. This cursor can be moved in the following ways:
<Up Arrow> or <PgUp> moves it up
<Down Arrow> or <PgDn> moves it down
<Left Arrow> or <Grey -> moves it left
<Right Arrow> or <Grey +> moves it right
<Home> moves it to row 1, column 1
<End> moves it to row 25, column 80
In addition
S switches this block cursor to your other monitor
<Esc> exits the marking module with no action being taken
All the actions discussed in the next section can be taken
with the one character box formed by the block cursor. To get a
bigger box, you must "tack down" one corner. Pressing <Ins> or
<Enter> tacks down the upper left corner of the box. You can then
move the lower right hand corner with the arrow keys so long as the
box remains at least one row down and one column across. Thus the
arrow keys change the size of your box. You can also move the box
as a whole without changing its size: <PgUp> and <PgDn> move it up
and down while <Grey +> and <Grey -> move it right and left.
<Home> moves the upper left hand corner of your box to the upper
left hand corner of the screen and <End> does the same with the
lower right corners. And S will switch the box from one screen to
the other.
The box will appear on a color screen in distinctive colors
and on a monochrome screen in reverse video. However, there may be
a problem showing the box on your monochrome monitor if you set
colors with an ANSI.SYS prompt; as we will discuss in the Usage
Notes of this chapter, these problems may be resolved with the ^@V
command. You may also have problems with an invisible box on a
black and white monitor attached to a graphics card such as the
standard COMPAQ setup. This can be solved by customizing the
program according to the directions in Chapter IX.
V.2 What you can do with the Marked Box
Once you have a marked box on the screen, you can take the
following actions:
S Switch the box to your other screen
Chapter V:MARKING MODE Page 19
Documentation for CTRLALT
P Print it on your printer (no filtering of control
characters)
E Enter it at the position that your cursor had when
you called up ^@<Enter>
C Copy it to the same position on your other monitor
U cUt it to the large buffer
<Enter> has the same action as U
<Ins> has the same action as U
<Esc> exits marking mode with no action being taken
For any of these actions except <S>, the box disappears, your
screen is restored and you exit CTRLALT. You can copy from your
inactive to your active monitor but this will only affect what is
displayed on the screen and is not the same as having typed in the
characters.
Using the E option not only enters the characters at your
cursor position but also puts them in the large buffer. The way
the characters are entered is determined by the same options set in
the insert mode and discussed in the next section. That is, the
option <E> is the same as <U> followed immediately by ^@I.
The contents of the large buffer are only changed if you cUt
or Enter the box in which case the box replaces what was in the
buffer. Options <P>, <C> and <Esc> do not change the contents of
the large buffer. As in the case of the small buffer which is not
emptied in response to a ^@A or ^@H, the contents of the large
buffer are not changed by a ^@<Enter> but only in response to some
of its subcommands.
V.3 Inserting the Large Buffer
It wouldn't do much good to be able to put characters into
the large buffer if there wasn't a way to get them out. ^@I will
Insert (don't confuse ^@Insert with ^@<Ins>: the latter is NOT a
CTRLALT command to avoid an accidental ^@<Del>) the contents of the
large buffer as a series of keystrokes which are then acted upon by
your application program. The entire contents of the buffer will
be entered and you will then exit CTRLALT. The buffer is unchanged
so you can reenter it with a second ^@I. You can suspend the
playback of the contents of the large buffer with ^@Q. After using
^@Q to Quit, you are back in your application program. A ^@I will
reinsert the large buffer from its beginning while another ^@Q will
continue the playback of the buffer at the point you quit with the
first ^@Q.
The large buffer stores a box and therefore more than one
line of characters. Depending on the application, you may want
line ends to be treated in different way. CTRLALT will treat line
Chapter V:MARKING MODE Page 20
Documentation for CTRLALT
ends in one of three different ways. You choose the entry mode
with suitable ^@ commands:
^@R carriage Return mode, the mode in which CTRLALT starts
^@B Backspace mode
^@Z Zilch mode
You only need issue this command once and CTRLALT will remember it
until you issue another one of them. When ^@I is issued or the <E>
subcommand is chosen from marking mode, CTRLALT uses the mode
determined by the last of these three commands or it uses carriage
Return mode if none of these commands has been issued since
loading.
In carriage Return mode, CTRLALT sends a carriage return
(ASCII 013) at the end of each intermediate line in the buffer.
This is precisely the code sent by the <Enter> key as you can check
by using ^@T. This is the proper mode to use in certain word
processors.
In Backspace mode, CTRLALT looks at the length of the lines
in the buffer and sends a sequence of left arrow keystrokes
followed by a down arrow at the conclusion of each line. This will
tend to produce a rectangular box in most word processors but you
may have a problem if your word processor ignores down arrows
issued at the bottom of a file. This is also the slowest entry
method. Despite the name, it is <Left arrow>s and not <Backspace>s
that are issued in this mode.
In Zilch mode, as the name implies, CTRLALT sends no
keystrokes at the end of a line but continues to send the
characters on the next line. If you don't want to preserve the box
shape of what you put in the buffer and you are sending the
characters to a word processor with word wrap, Zilch is probably
for you.
Not all applications can take keystrokes at the rate that
CTRLALT supplies them. For that reason, you can issue a command to
CTRLALT to send keystrokes at a slower rate. It will then issue
keystrokes at that rate until its receives a command to use the
faster rate. The commands are:
^@- use slower speed
^@+ use faster rate
The + and - refer to the keys on the top row and not the <Grey +>
and <Grey -> which are too close to <Del>. By ^@+ we mean ^@ and
the <+/=> key; you should NOT also depress a shift key. By default
CTRLALT starts in the fast mode. PCWRITE in Backspace mode
requires the slower speed to operate properly.
While it is intended that you issue ^@+ and ^@- at a time
when CTRLALT is not inserting keystrokes in response to a ^@I,
there seems to be no problem issuing these commands while an
Chapter V:MARKING MODE Page 21
Documentation for CTRLALT
insertion is in progress. The results of issuing ^@R, ^@B or ^@Z
during an insertion are unpredictable.
V.4 Usage Notes
The attributes used to display the difference between a box
being made with CTRLALT and the ambient background are determined by
a method which will show a multiply colored box overlaying a
multiply colored screen. On an ordinary monochrome monitor with
the normal attributes for regular (07) and reverse video (70), the
box shows as reverse video where it overlays ordinary text and
ordinary video where it overlays reverse video. However, if you
have a two monitor system and set your prompt with ANSI.SYS, or if
you are looking at the output of a program intended to run in
color, the attributes on the monochrome screen may be non-standard.
That is the bytes stored in memory will not be the usual 07
although the screen will appear normal. Thus if you use ANSI to
set yellow on blue as the colors on your color screen while in DOS,
the attributes which ANSI.SYS sets up when you're active on your
monochrome screen will be 1E which appear as intense amber (or
green) on black. The algorithm used by CTRLALT will set the
attributes in a box on the monochrome monitor to 69 which also
appears as bright amber (or green) on black so the box is
invisible! For this situation, we have built in a special command
^@V which will change all the attributes on your monochrome screen
to the plain Vanilla 07. So if you are on the monochrome screen
and your marking box appears to be invisible, do the following:
<Esc> to exit marking mode
^@V to Vanillaize attributes
^@<Enter> to return to marking mode
The marking box will not longer be invisible. If you use ^@V
before or without <Esc>aping first, the results will not be the
desired ones and you should follow the above directions. These
comments apply also to print control mode. If you are using the
commercial program FANSI-CONSOLE, it uses a better algorithm for
setting attributes on the monochrome screen and you will probably
not have the same need for ^@V.
As explained in Section III.5, text entered by CTRLALT is
sent to your application as if it were entered via the alt-numeric
keypad, i.e. with a reported scan code of 00. This may affect
how it is treated by certain keyboard macro programs especially
those such as KEYWORKS that allow you to define macros on the alt-
numeric keypad. With such a program, it would be wise to restrict
the numbers of these macros to the range 128-175 to avoid
unexpected results when entering characters from the buffers or in
the box drawing mode.
The remarks made in Section IV.3 about the marking of lines
Chapter V:MARKING MODE Page 22
Documentation for CTRLALT
on the EGA running in 43 line mode when in print control mode also
apply to marking mode.
Chapter V:MARKING MODE Page 23
╒═══╕ ╓───────╖
Chapter VI: │BOX│ ║DRAWING║
╘═══╛ ╙───────╜
COMMANDS: ^@<0>,^@<1>,...,^@<9>
character type set with 0-6, cursor movement with 7,8,9
SUBCOMMANDS: @<n0>,...,@<n9>,@<Grey +>,@<Grey ->
VI.1 The Alt Numeric Keypad
When IBM decided to develop an extended ASCII code covering
the codes from 129 through 256, they included 40 box drawing
characters to allow single line boxes, double line boxes and mixed
boxes like those in the title of this chapter. These characters
display properly on the screen and on some printers (but the IBM
graphics printer prints all graphics characters as single line
characters, even the double line and mixed characters; the
Proprinter prints them out as they appear on the screen) and they
are much more elegant than what people try to put together with =,
- and |. Just compare
───────────────────── with -------------------
or ═════════════════════ with ===================
│ |
│ |
│ |
or │ with |
│ |
│ |
The problem is that there is not any simple way of embedding
graphics characters in your word processing files. There are full
featured monographics editing programs like MONOGRAFXS which are
quite nice but they don't solve the problem of occasional use or
the occasional user. CTRLALT provides access to these box drawing
characters in a simple and logical way. The keystrokes that we use
for this depend on exploiting a redundancy built into the standard
keyboard setup. One can always enter box characters by knowing
their ASCII codes and using the <Alt> shift and the numeric keypad.
For example, the corner └ has decimal ASCII code 192 so one can
enter it by holding down the <Alt> key and pressing <n1>, <n9>,
<n2> on the numeric keypad. When you lift your finger off the
<Alt> key, the └ should appear. Try it in DOS. The point is that
you can get the same result by pressing the <Alt>-<Lft Shft>
combination instead of the <Alt> key and this leaves the <Alt>
keypad for other uses. Of course, one can't get 40 characters out
of a ten key keypad, so we use ^@numbers to shift between different
templates for the keypad; one of the possibilities is ^@0(zero)
which returns the alt-keypad to its usual state so you can continue
to use it for entering ASCII codes or for use in your keyboard
macro program which has a key like <AltEND>. ^@1-4 will give
templates with the various box characters and ^@5-6 yield some other
Chapter VI:BOX DRAWING Page 24
Documentation for CTRLALT
useful extended ASCII characters. ^@7-9 will control the cursor
motion associated with the keys that send in the straight graphics
characters. Later in the chapter, tables will appear that should
be useful if viewed on the screen. Not all printers will print the
graphics characters.
VI.2 Box drawing characters
The shape of the numeric keypad is perfect for associating to
those graphics characters which are not straight. This is one
place where a picture is worth a thousand words so we show the
keypad and the characters one obtains with them in the default ^@1
mode:
7 8 9 ┌ ┬ ┐
4 5 6 ├ ┼ ┤
1 2 3 └ ┴ ┘
^@1
so that @<n3> will give ┘ and @<n5> will give ┼. There are two
other single line characters, the straight lines ─ and │ and these
are given by @<Grey -> and @<Grey +> respectively. Of course - is
a horizontal line and + has a vertical line.
Similarly, ^@2 gives the double line characters, ^@3 the
characters associated with double horizontal and single vertical
while ^@4 is the reverse. A mnemonic for remembering which is
which is to note that the number 3 has more horizontal lines than
vertical lines while 4 has more vertical than horizontal lines. In
pictures:
7 8 9 ╔ ╦ ╗ ╒ ╤ ╕ ╓ ╥ ╖
4 5 6 ╠ ╬ ╣ ╞ ╪ ╡ ╟ ╫ ╢
1 2 3 ╚ ╩ ╝ ╘ ╧ ╛ ╙ ╨ ╜
^@2 ^@3 ^@4
Thus, for example to insert ╧, first hit ^@3 and then @<n2>.
Until some other of ^@0-6 is struck, the @<n.> keys will then
yield the characters shown above ^@3.
In each case @<Grey+> and @<Grey -> give the vertical and
horizontal line characters for the associated set (so, for example
@<Grey -> gives ═ with ^@2 and ^@3 while @<Grey +> gives ║ with ^@2
and ^@4).
Chapter VI:BOX DRAWING Page 25
Documentation for CTRLALT
VI.3 Other graphics characters
^@5 and ^@6 give shading and Greek characters respectively as
shown in:
7 8 9 ▌ ▐ ▀ α ß τ
┌─┐ ┌─┐ ┌─┐
4 5 6 │-│ █ ■ ▄ │«│ δ ε Θ │Γ│
├─┤ ├─┤ ├─┤
1 2 3 │+│ ░ ▒ ▓ │»│ µ π σ │Σ│
└─┘ └─┘ └─┘
^@5 ^@6
The shading characters shown in positions 7 and 8 look the same but
occupy the left and right sides of a space so that @<n7>@<n8> is ▌▐
while @<n8>@<n7> is ▐▌. Similarly positions 9 and 6 are top and
bottom as in ▀▄ and ▄▀. The characters on the Grey +/-
make attractive patterns as in:
««««««««»»»»»»»
»»»»»»»»»»»»»»»
The way to remember the shading characters is that the
shading gets darker as one runs from @<n1> to @<n4>, the left hand
shading is to the left of the right hand shading (@<n7> and @<n8>)
while the top half shading is on top of the bottom half shading.
The Greek letters are in alphabetical order reading as if the
keypad were a page rather than in numeric order and the Grey +/-
have capital Greek letters. Σ, the mathematical symbol for sum is
associated to the plus key. There are three additional Greek
letters included in the IBM set: ASCII 232 Φ, 234 Ω and 237 φ not
to mention the Greek letters that IBM doesn't recognize!
VI.4 Cursor motion and <Grey +/->
The three commands ^@7, ^@8, ^@9 control the way that the
cursor moves when one issues an @<Grey +> or @<Grey -> keystroke.
In the default mode, to which one can return with ^@8, the
character is issued and the cursor moves right one position. In
the mode reached with ^@9, @<Grey -> works the same as in the
default mode but for @<Grey +> the cursor moves down one row rather
than right. Thus one can draw a line downward by depressing the
alt key and tapping the <Grey +> several times. In the mode
reached from ^@7, the cursor moves back one step after @<Grey ->
and up one after @<Grey +>.
These extra cursor modes are only operational when the
@numeric keypad is in a mode set by one of the commands ^@1-4;
Chapter VI:BOX DRAWING Page 26
Documentation for CTRLALT
there is no unusual cursor motion in the modes set by ^@0, ^@5 or
^@6. But CTRLALT does remember the cursor movement mode that was
set if you go, for example, from ^@1 to ^@6 and back to ^@1.
VI.5 Usage Notes
Notice that states of the Alt keypad numbers are set with ^@
-top row number commands. We want to be sure to keep your fingers
away from an accidental ^@<Del>.
The motion of the cursor when ^@7 or ^@9 is set is based on
the assumptions that entering a character moves the cursor right
one character and that arrow keys act in the conventional way.
Thus the action of @<Grey +> in ^@9 mode is accomplished by sending
the three keystrokes │ (ASCII 179), <Lft> (ASCII 00;75) and <Down>
(ASCII 00;80). If these assumptions are not met the results can be
unexpected.
In PCWRITE, there is a problem with the rapid entry of two
<Lft>'s: the cursor moves left, not two but three spaces. The
@<Grey -> does not work properly in ^@7 mode when you are running
PCWRITE.
Keyboard macro programs typically allow you to define
macros on keystrokes like <AltEND> if you hold down the <Alt> key
and tap <End>. These macros are still accessible to you if go into
^@0 mode. What happens if you try to define such a macro on ^@<n1>
if you are in a mode like ^@1 will depend on the particular macro
program. For example if you are using SUPERKEY, you will get the
message that you are defining a macro based on └. This means you
can define not one <AltEND> macro but 7 of them and move between
them with a choice from ^@0 to ^@6. In KEYWORKS, the effect will
be similar but instead of telling you that the macro is named "└",
it will give you the name {{192} (192 is the decimal ASCII code for
└).
Chapter VI:BOX DRAWING Page 27
Chapter VII: THE EMERGENCY EXIT
COMMAND: ^@<F9>
VII.1 A Powerful but Dangerous Command
CTRLALT provides a service which can be very useful but which
can cause crashes and loss of work if not used properly. We urge
you to experiment with it before using it "under fire" and to read
this ENTIRE chapter before doing any experimentation on your own.
We have made the keystroke invoking this service ^@<F9> which is
sufficiently awkward that it is unlikely you would issue it by
mistake. In particular, you can safely choose to ignore this
chapter and the service provided if our warnings make you nervous
(but we think that would be a mistake since the service can be
useful).
You have surely had the experience of your machine apparently
locking up for no apparent reason or because you bumped the wrong
key causing your application program to bomb. There is no real
excuse for applications programs to behave like that but some do
because some programmer neglected to put error checking in one
place or another. In that situation, you have had to reboot or
even turn the machine on and off. ^@<F9> will occasionally save
you when this happens. This solution is not ideal; what ^@<F9>
does is issue a call to DOS (service 4CH of interrupt 21H if you
really want to know) to terminate the currently running program.
Any work you did during the current session in that program and
which you or the program did not explicitly save will be lost. But
if the exit is successful, you will not have to wait while your
system boots up again nor will you lose the contents of your RAM
disk, or anything left unsaved in resident programs like SIDEKICK's
notepad.
^@<F9> is also useful for exiting certain game programs which
do not give you any way of exiting to DOS but expect you to reboot
the machine when you are finished playing.
If you want to see ^@<F9> in action, you can try the
following experiment. Use DEBUG to make a little two byte program
which will put your computer into an endless loop. Here is how the
debug session should look (WARNING: DO NOT THINK, "Oh I know how to
do that in BASIC; it won't matter if I don't follow directions and
use BASIC instead". YOU WILL BE SORRY IF YOU TRY EXPERIMENTS WITH
^@<F9> AND BASIC BEFORE READING THIS CHAPTER!!):
Chapter VII:THE EMERGENCY EXIT Page 28
Documentation for CTRLALT
>debug junk.com
File not found
-a
xxxx:0100 jmp 100
xxxx:0102
-rcx
CX 0000
:2
-w
Writing 0002 bytes
-q
Here, "xxxx" is an irrelevant string of four hex digits.
Merely making this program will not produce any effect but
running it will. So please be sure that CTRLALT has been installed
and type in "junk" at the DOS command line. The cursor will move
down and sit there but the machine will respond to no normal
keystrokes, even <Ctrl C> or <Ctrl Break>. Your resident programs
may still be accessible. For example, when we tried the
experiment, SIDEKICK could still be called up but SUPERKEY could
not unless SIDEKICK was called up first. When you've decided that
you can't think of any way out but rebooting, use ^@<F9>.
Impressed? If you hit various keys in your attempt to exit they
may now appear on the screen since they were put into the keyboard
buffer and released when DOS came back (if you invoked SIDEKICK,
it may have eaten the keys in the buffer so they may not appear).
VII.2 Fouled Interrupts
Generally, ^@<F9> will "work" at any time that the machine
would respond to ^@<Del>. If your machine is so dead that you must
turn it on and off, ^@<F9> will certainly have no effect but it
can't hurt to try. And if ^@<F9> doesn't work, certainly try
rebooting via ^@<Del> before giving up and powering off and on.
There are times that ^@<F9> will successfully exit the running
program and give you a DOS prompt but the machine will not respond
to the keyboard. This happens because while you successfully
terminated the running program, the crash involved more than a
logic loop in the program; a keyboard interrupt could be fouled or
some aspect of DOS could be sick. In that case, you'll have to
reboot via ^@<Del>. It should be possible to make a version of the
RELEASE program mentioned below a resident part of CTRLALT which
might probably save you in such situations and we may do that in a
future release of CTRLALT.
It is important that you understand in vague terms why this
problem occurs. When you strike a key on your keyboard, a signal
Chapter VII:THE EMERGENCY EXIT Page 29
Documentation for CTRLALT
is sent to your CPU telling it to invoke a special program. To
find that program it looks at the four bytes starting at memory
address 00024H (Interrupt 09H). These four bytes are interpreted
as a memory address and the computer looks to that memory address
to find the special program to run. Initially, the address is in
the ROM, that is the memory "hard wired" into your machine.
Keyboard macro programs work precisely by changing that address
when they load. The macro program puts the address of some of its
code in memory location 00024H and the CPU then invokes the macro
program whenever a key is struck. Typically, the macro program
will decide if the keystroke was "intended for it" and if not, it
will then invoke the routine at what used to be called from address
00024H. Suppose somehow that the four bytes at address 00024H get
changed in a random way. Then, striking a key will call up an
irrelevant program or even what the CPU would regard as pure
babble. Actually, if int 09H were fouled, ^@<F9> would not work
but keyboard input in DOS involves an additional interrupt (16H)
which could be fouled without affecting ^@<F9>.
The point of giving you this technical discussion is that
there are many interrupts besides 09H and 16H. If they become
fouled, you may not realize it since keystrokes will act normally
but some other action like reading a disk or loading a program may
cause your CPU to get babble. There is another possible problem
related to this. Suppose the application program you loaded
changed int 9H so that the application program directly processes
keystrokes (two programs notorious for doing this are XYWRITE and
SMARTCOM). While ^@<F9> has exited the program, it has not removed
the code for the program so that it could happen that the code for
the exited program will continue to successfully process
keystrokes. However, exiting the program has told DOS that the
memory can be used so that loading some other program overwrites
the code that was processing keystrokes. Since the address at int
9H still points to the overwritten address, you have babble this
way too. Thus, ^@<F9> may get you out of trouble but lead to an
unstable state.
Fortunately, errors in the interrupt table or DOS (produced
by an application program doing something stupid) are likely to so
foul the system that you won't be fooled into thinking all is well.
Thus the problem of merely apparent salvation will be associated
with using the emergency exit from certain programs. Which ones?
We wish that we could tell you. You will learn mainly by trial and
error but it appears that many programs are safe. Generally the
one with problems are those that clearly don't "play by the rules".
If your keyboard macro program doesn't work in an application, it
is likely that it will produce an unstable state after an emergency
exit. And BASIC changes a whole bunch of interrupts so using
^@<F9> inside BASIC will cause an unstable state. There may also
be problems with complied BASIC programs.
Chapter VII:THE EMERGENCY EXIT Page 30
Documentation for CTRLALT
VII.3 RELEASE: A Safety Valve
With some advanced planning and the program RELEASE.COM
(written by one of us - RMW - and in the public domain) which is
included with this package, you can give yourself an extra safety
valve to use when you have issued a ^@<F9> and are unsure of the
state of your interrupt table. RELEASE works in the following way:
at any time you have a DOS prompt, you can run the RELEASE program
by typing the command
release FILENAME
FILENAME can include an optional drive and directory name and must
include a valid filename with NO extension. If a drive and/or
directory path are not given, RELEASE will use the current values.
This command will create a file in the specified drive and
directory with the name FILENAME.com. If such a file previously
exists RELEASE will erase it and replace it with the file it
creates. Thus "release B:\foo\george" will create george.com in
the directory foo of drive B and any previous george.com in that
directory will be eliminated. If you later run the program
george.com (by issuing the command "george" from the proper
directory or having that directory in your DOS search path), the
program will remove any programs loaded subsequently to your having
run RELEASE and restore the interrupt table to its state at the
time george.com was created. In particular, it might pay to
include the line "release aeend" near the end of your autoexec.bat
file. If you invoke ^@<F9> and are concerned about the stability
of your system, just run aeend. We have tested this procedure
after exiting from BASIC with no later problems. Of course, you
may find RELEASE useful for memory management tasks other than just
saving you after ^@<F9>.
VII.4 Usage Notes
It can happen that exiting a resident program like SIDEKICK
especially when running an application program in graphics mode
will fail to restore the screen. This is a time when ^@<F9> will
at least save you from rebooting. However, you will lose any work
which was not previously saved so you should try other methods like
reinvoking the resident program or refreshing the screen in the
application program by <PgUp> and <PgDn> if appropriate.
Invoking ^@<F9> from a resident program like SIDEKICK is
perfectly possible (although SIDEKICK is unlikely to lead to a
situation where ^@<F9> is needed, we have known the system to lock
up with SIDEKICK active due to a conflict with another resident
program). However, ^@<F9> issues a command to DOS to return to the
DOS level so that ^@<F9> will not only terminate the resident
Chapter VII:THE EMERGENCY EXIT Page 31
Documentation for CTRLALT
program but also the application program that was running when the
resident program was invoked. It may also happen that you are no
longer able to call up the resident program with its hotkeys if you
have exited it with ^@<F9>. This will depend on the program and
the state it is in when you invoke ^@<F9>. For example, if you
call up CTRLALT via ^@A and then use ^@<F9>, you will disable all
the tables although the other features of CTRLALT will still be
accessible. This has to do with the internal structure of CTRLALT.
CTRLALT saves the part of the screen replaced by a table in a
special buffer in order to restore the screen upon exiting. To
save memory, only one buffer is kept which means that CTRLALT will
not let you call up one table when another is currently active. It
does this by setting an internal flag saying a table is currently
active. When this flag is set, the four table commands ^@A,H,N,T
have no effect. Exiting a table with <Esc> resets the flag but
exiting with ^@<F9> cannot reset the flag and thus the tables are
disabled. The point of this discussion is to explain why the
behavior of a resident program exited with ^@<F9> will depend on
the program and its current state.
DOS has special rules for how its special processes act in
response to ^@<F9>. If a batch file is running and ^@<F9> is
invoked, the batch file is not terminated. If you have called up
an application program with a batch file and you issue a ^@<F9>,
you will exit that application program but the batch file will
continue running (if you ever want to exit a running batch file,
Ctrl-C or Ctrl-Break works fine). If you are in a new shell of DOS
^@<F9> will return you to that shell and does not terminate the
shell, that is ^@<F9> does not terminate the program command.com.
The com files produced by RELEASE can be dangerous if run
during a different session where other programs are loaded. For
example, if you change your autoexec.bat file and later run an
aeend file produced in an earlier session, you are bound to have a
serious problem. This is why RELEASE erases any file with the same
name as the one you are trying to create. To add to you safety, we
recommend placing the com files made by RELEASE on a RAM disk if
you have one.
RELEASE does not know about Lotus/Intel/Microsoft EMS and
will not properly free any EMS memory filled up between when
RELEASE was run and when you run the com file RELEASE made. There
is a pair of public domain programs written by Turbo Power software
called MARK and RELEASE (different RELEASE; if you have both rename
one of them!) which serve a function similar to the RELEASE program
discussed here but which includes EMS support. However, you cannot
use the MARK/RELEASE combination as a safety valve as described
above. If run after BASIC, the other RELEASE program will cause a
dramatic hard crash. The difference seems to be that the Turbo
Power RELEASE, being a TURBO PASCAL program is large (about 13K)
Chapter VII:THE EMERGENCY EXIT Page 32
Documentation for CTRLALT
while the com file made by Wilson's RELEASE is small (555 bytes)
and so Turbo Power's RELEASE overwrites some code pointed to by an
interrupt. If you have both programs available and use EMS memory,
you can first run Turbo Power's MARK and then Wilson's RELEASE at
the end of your autoexec.bat file. Then when trying to recover
from a dangerous ^@<F9>, you first run the com file made by
Wilson's RELEASE and then the Turbo Power RELEASE program.
Chapter VII:THE EMERGENCY EXIT Page 33
Chapter VIII: COMMAND SUMMARY
Section numbers appear in parentheses
────────────────────────────────╥──────────────────────────────────
^@A ASCII table (III.1-2) ║ ^@U NOT USED
^@B Backspace mode (V.3) ║ ^@V Vanilla (V.4)
^@C Copy screen (II.1) ║ ^@W NOT USED
^@D NOT USED ║ ^@X NOT USED
^@E Enter small buffer (III.2)║ ^@Y NOT USED
^@F NOT USED ║ ^@Z Zilch mode (V.3)
^@G NOT USED ║ ^@<F9> Emergency Exit to DOS (VII)
^@H Hex table (III.1-2) ║ ^@<Enter> Marking Mode (V.1,2)
^@I Insert large buffer (V.3) ║ ^@<=/+> Fast Insert Mode (V.3)
^@J NOT USED ║ ^@<-/_> Slow Insert Mode (V.3)
^@K Kill other screen (II.1) ║ ^@1 └ ┴ ┘ ├ ┼ ┤ ┌ ┬ ┐ mode (VI.2)
^@L NOT USED ║ ^@2 ╚ ╩ ╝ ╠ ╬ ╣ ╔ ╦ ╗ mode(VI.2)
^@M NOT USED ║ ^@3 ╘ ╧ ╛ ╞ ╪ ╡ ╒ ╤ ╕ mode(VI.2)
^@N aNsi table (III.3) ║ ^@4 ╙ ╨ ╜ ╟ ╫ ╢ ╓ ╥ ╖ mode(VI.2)
^@O tbls on Other scrn (III.1)║ ^@5 ░ ▒ ▓ █ ■ ▄ ▌ ▐ ▀ mode(VI.3)
^@P Print control mode ║ ^@6 µ π σ δ ε Θ α ß τ mode(VI.3)
^@Q Quit buffer insert (V.3) ║ ^@7 - left; + up mode (VI.4)
^@R carriage Return mode (V.3)║ ^@8 normal alt <Grey +/-> (VI.4)
^@S Switch monitors ║ ^@9 - right; + down mode (VI.4)
^@T aTtribute table (III.3) ║ ^@0 @Keypad in standard mode
────────────────────────────────╨──────────────────────────────────
^@A,^@H subcommands: E(nter), P(rint), B(uffer), Arrows, <Esc>
^@P subcommands: <Up>,<Down>,<PgUp>,<PgDn>,S(witch),P(rint),
A(ll), various escape codes to printer
^@<Enter> subcommands: Arrows, <Enter> or <Ins> to tack down
Arrows, <PgUp>,<PgDn>,<Grey +>,<Grey ->
S(witch), C(opy), P(rint),
(c)U(t)=<Enter>=<Ins>
^@1-6: @numeric keypad, @<Grey +>, @<Grey ->
Chapter VIII:COMMAND SUMMARY Page 34
Chapter IX:CUSTOMIZING CTRLALT
IX.1 The Procedure
If you have access to the IBM or Microsoft Macro Assembler,
it is quite easy to customize CTRLALT. In the last section, we
will even give you directions for using DEBUG to change some of the
parameters if you do not have the Macro Assembler and you still
wish to change some of the more important parameters. If you wish
to customize CTRLALT and have the Macro Assembler, you should take
the source code file ctrlalt.asm and make a copy with a convenient
name, say mycalt.asm and do the following: first edit the file with
an ASCII file editor or word processor capable of producing pure
ASCII text. For example, PCWrite was used to edit the original
source file. Editing directions will be found in Sections 2-8 of
this chapter. After editing mycalt.asm you will need to issue the
sequence of commands:
masm mycalt;
link mycalt;
exe2bin mycalt mycalt.com
You might care to then erase mycalt.obj and mycalt.exe.
The source code begins with eight parts separated by a line
of dashes before the code itself which is separated from the
preliminaries by a line of #'s. Part 1 has the copyright and other
goodies. We will refer to places to change by the parts and lines
in the parts.
IX.2 Fundamental key combination
The last line of part 2 (line 23) says "call combo = 0CH".
This sets the Ctrl and Alt keys as the basic call up combination.
Change 0CH to xxH as indicated below for the key combination
indicated:
0CH Ctrl-Alt
06H Ctrl-LShift
0AH Alt-LShift
03H RShift-LShift
05H Ctrl-RShift
09H Alt-RShift
01H Right Shift alone
02H Left Shift alone
04H Ctrl alone
08H Alt alone
We believe that the first two possibilities are the preferred
one; you should save the Alt-LShift combination for the Alt-numeric
Chapter IX:CUSTOMIZING CTRLALT Page 35
Documentation for CTRLALT
keypad. Combination with the right shift are awkward. It is
possible to use only a single shift with letters to call up CTRLALT
but this will disable many key combinations needed by other
programs (but you could, if desperate dedicate one of your shifts
to CTRLALT but shouldn't unless you are a real hunt and peek
typist).
IX.3 Command Keys
The fourth section of the code begins:
;**** SCAN CODES FOR COMMAND KEYS FOLLOW:
commands db 1FH,2EH,25H,18H,1EH,19H,23H,43H
db 1CH,17H,10H,0CH,0DH,30H,12H
db 0BH,2,3,4,5,6,7
db 14H,13H,8,9,0AH
db 2FH,2CH,31H
These five line correspond to the basic command combinations:
^@S,^@C,^@K,^@O("oh"),^@A,^@P,^@H,^@<F9>
^@<Enter>,^@I,^@Q,^@<-/_>,^@<+/=>,^@B,^@E
^@0,^@1,^@2,^@3,^@4,^@5,^@6
^@T,^@R,^@7,^@8,^@9
^@V,^@Z,^@N
Suppose that you wish to change the callup for print control
mode from ^@P to ^@<PrtSc> which you might because you own a
program that already uses ^@P as its callup command. You search
for ^@P (the default in the second of the tables above) or
alternately get the scan code in HEX for <P> (using ^@T; the scan
code is 19) and search for it in the first table above. This tells
you that you need to change the sixth entry in line 1 of the
section "SCAN CODES FOR COMMAND KEYS FOLLOW:". You find the scan
code for <PrtSc/*> which is 37H and modify that entry in line one
in the source file mycalt.asm. It should now read:
commands db 1FH,2EH,25H,18H,1EH,37H,23H,43H
In making these changes keep the following in mind:
-You must use the hex scan codes; the basic manual lists scan
codes in hex but of course, it is easier to use ^@T
-Unless the scan code is less than 9, you must include an H
-Beware that the number key "n" has scan code "n+1"
IMPORTANT: If you want to disable a CTRLALT module, just change its
call up key code to 0FFH. (The 0 is important!). For example, if
you have a single monitor system, we recommend disabling the four
basic dual monitor commands so the first line should read:
Chapter IX:CUSTOMIZING CTRLALT Page 36
Documentation for CTRLALT
commands db 0FFH,0FFH,0FFH,0FFH,1EH,37H,23H,43H
There are also subcommands which can be changed. These occur in
sections 5-7 of the initial stuff. We leave it to the user to
puzzle out the meanings of the funny labels or to use the scan
codes except to note that with a singe monitor system you should
disable the <S> subcommands by changing the 1FH that appears on the
line in section 5 beginning "prtcoms" and the 1FH that appears on
the third line in section 6 to a 0FFH.
IX.4 Table Colors
If you don't like the color which we have picked for the
various tables, the first 7 lines in section 2 of the code deal
with those. The attributes for the borders of the table on the
color monitor (default of 19H=bright blue on blue) are called
"border", the attributes for the numbers and labels (default of
1FH=white on blue) are called "background" and the attributes for
the actual characters (default of 30H=black on cyan) are called
"mainattr". There are similar labels for the monochrome screen.
The scan code and aNsi labels have attributes (default 1B=bright
cyan on blue) have the name "attrlabel". We recommend the
following changes for the COMPAQ dual mode monitors:
mainattr = 0FH
attrlabel = 10H
IX.5 Table Locations
If you don't like the locations that we have chosen for the
tables, you can change them but not dynamically. That is you can
make a permanent change but if a table comes up in a bad place one
time there is nothing that you can do (at least for this version of
CTRLALT). The upper left hand corners of the tables are determined
by decimal numbers occurring in section 2 of the code with "begoff"
labels. These numbers MUST be even. If you want to locate the
corner in column y of row x this number should be 160x+2y with the
convention that rows are labelled 0-24 and columns 0-79. If you
make y too close to 79 the table will line wrap and look rather
funny. In addition, you need to be careful that positions of the
ASCII and Hex tables don't overlap or else ^@O will produce an
improper display.
IX.6 Copy Attributes
You can change the colors used when ^@C is invoked. The
comments in section 2 of the source code are clear on this account.
Chapter IX:CUSTOMIZING CTRLALT Page 37
Documentation for CTRLALT
IX.7 XOR Attributes
The cursor in the ASCII/Hex tables and in the ^@<Enter>/^@P
modes has colors set by "xoring" the present attributes with
attributes given in the source code. This is not the place to
explain that algorithm. We recommend the following changes for the
COMPAQ dual mode monitor:
colxor = 27H
ascolxor = 7FH
IX.8 Printer Escape Sequences
The eighth section of the source file lists the decimal ASCII
sequences sent to the printer by the various letter subcommands in
^@P. You can change these sequences if your printer does not use
IBM graphics control sequences. For example with the Epson LQ-1500
whose NLQ mode is called up with a distinct sequence to that used
by the Proprinter, you would replace the line
qual db 27,73,2,0FFH ;proprinter
with
qual db 27,126,1,0FFH ;LQ-1500
Please add "0FFH" to the end of the sequence listed in your
printer manual. That code is used for CTRLALT's internal purposes.
IX.9 Using DEBUG
The table below gives various addresses for using DEBUG to
change certain bytes in the com file:
Function ║ Byte(Hex; offset 100H) ║ Default(Hex)
───────────────────╫────────────────────────────╫─────────────────
CallUp ║ 2BE ║ 0C
^@S ║ 14F ║ 1F
^@C ║ 150 ║ 2E
^@K ║ 151 ║ 25
^@O ║ 152 ║ 18
^@P:Switch ║ 1B1 ║ 1F
^@<Enter>:S ║ 20D ║ 1F
Mainattr ║ 86D ║ 30
Attrlabel ║ 527,784,8DB,8F4 ║ 1B
Colxor ║ 36F ║ 2A
Ascolxor ║ 928 ║ 5F
The callup function is discussed in Section IX.2; the other
Chapter IX:CUSTOMIZING CTRLALT Page 38
Documentation for CTRLALT
functions involve things we recommend changing for the COMPAQ dual
mode monitor (disable the 6 monitor switches and follow the
recommendations in Sections IX.4 and IX.6 for attributes). Here is
a trial debug session modifying CTRLALT for the COMPAQ. It assumes
that you have copied ctrlalt.com to cacmq.com:
>debug cacmq.com
-e14f
xxxx:014F 1F.ff
-e150
xxxx:0150 2E.ff
-e151
xxxx:0151 25.ff
-e152
xxxx:0152 18.ff
-e1b1
xxxx:01B1 1F.ff
-e20d
xxxx:020D 1F.ff
-e86d
xxxx:086D 30.0f
-e527
xxxx:0527 1B.10
-e784
xxxx:0784 1B.10
-e8db
xxxx:08DB 1B.10
-e8f4
xxxx:08F4 1B.10
-e36f
xxxx:036F 2A.27
-e928
xxxx:0928 5F.7F
-w
Writing 0E36 bytes
-q
In the above, "xxxx" is an irrelevant four digit hex number.
The "e" command tells debug that you want a byte displayed and want
the option to change it. For example when you type in
"e928<Enter>" in response to the debug "-" prompt, debug responds
"xxxx:0928 5F."
telling you that 5F is currently there. You type in "7F<Enter>".
You could shorten things by just typing "e928 7F" in which case
debug would make the change and not report anything but we believe
the error checking of seeing the current byte displayed is useful.
Chapter IX:CUSTOMIZING CTRLALT Page 39